﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using PMSGSC.BLL;

namespace PMSGSC.App
{
    public partial class frmCounterHistory : DevExpress.XtraEditors.XtraForm
    {
        public frmCounterHistory()
        {
            InitializeComponent();
            equipmentBindingSource.DataSource = Equipment_BLL.GetAll(frmMain.ship.Ship_ID);
            historyCounterBindingSource.DataSource = CounterHistory_BLL.GetAll(frmMain.ship.Ship_ID);
            gridView1.ExpandAllGroups();
        }
        private void gridView1_CustomDrawRowIndicator(object sender, DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventArgs e)
        {
            if (e.RowHandle >= 0)
            {
                e.Info.DisplayText = (e.RowHandle + 1).ToString();
            }
        }

        private void gridView1_ShowingEditor(object sender, CancelEventArgs e)
        {
            e.Cancel = true;
        }

    }
}